<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>事件处理函数</title>
</head>
<body>
	<script>
		function addEvent (elem,type,handle){
			if (elem.addEventListener) {
				elem.addEventListener(type,handle,false);
			} else if{(elme.attacjEvent) {
				elem.attachEvent('on' + type,function(){
					handle.call(elem);
				})
			}else{
				elem['on' +type] = handle;
			}	
		}
	</script>
</body>
</html>